package com;

import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.sun.org.apache.xpath.internal.operations.String;

import java.util.Arrays;
import java.util.StringJoiner;
import java.util.stream.Collectors;

/**
 * @Author:zxh
 * @Description:
 * @Date: 2020/10/10
 * @Modified By:
 */
public class test {
    public static void main(String[] args) {
        JSONArray jsonArray = new JSONArray();
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("23",34);
        jsonObject.put("45",67);
        JSONObject jsonObject1 = new JSONObject();
        jsonObject1.put("33",12);
        jsonArray.add(jsonObject);
        jsonArray.add(jsonObject1);
        System.out.print(jsonArray.toString());

        /*String str = "23   w  ew we";
        String s = str.replaceAll(" ", "");
        System.out.println("输出: "+s);

        String creditRatingAgency = "'1','16','17','18'";
        String[] strOne = {"1","12"};
        String collect = Arrays.stream(strOne).collect(Collectors.joining(","));
        System.out.println("collent:"+strOne.toString());*/

    }
}

class test23{
    public static void main(String[] args) {
        DateTime date1 = DateUtil.date(1640966400000L);
        DateTime date2 = DateUtil.date(1667290838721L);

        //1641312000000,
          //      1667612869071
        DateTime date3 = DateUtil.date(1641312000000l);
        DateTime date4 = DateUtil.date(1667612869071l);
       // 1641744000000,
         //       1667785669071
        DateTime date5 = DateUtil.date(1641744000000l);
        DateTime date6 = DateUtil.date(1667785669071l);
        System.out.println("nihao");

    }
}

/**
 * 小数点处理
 */
class test12{
    public static void main(String[] args) {
        // double d = 1.234;
        // //String str = d + "";
        // java.lang.String str = java.lang.String.valueOf(d);
        // if (str.contains(".")) {
        //
        // }
        // System.out.println(str.length() - (str.indexOf(".") + 1));

    }
}
